//
//  UserfulFiveCell.m
//  JinChengYun
//
//  Created by 金橙云 on 2017/3/31.
//  Copyright © 2017年 金橙云. All rights reserved.
//

#import "UserfulFiveCell.h"


@implementation UserfulFiveCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        _oneLab= [[UILabel alloc] init];
        _oneLab.text = @"客户姓名呀 :";
        _oneLab.font = [UIFont systemFontOfSize:14];
        _oneLab.textColor =[UIColor blackColor];
        [self addSubview:_oneLab];
        [_oneLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(90, 18));
            make.top.equalTo(self.mas_top).offset(16);
            make.left.equalTo(self.mas_left).offset(8);
        }];
        
        
        _yinLabel = [UILabel new];
        _yinLabel.font = [UIFont systemFontOfSize:14];
       // _yinLabel.backgroundColor = [UIColor redColor];
        _yinLabel.numberOfLines = 0;
        _yinLabel.text = @"请选择";
        _yinLabel.textColor = [UIColor blackColor];
        
        [self addSubview:_yinLabel];
//        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(yinSutBtnClick:)];
//        [_yinLabel addGestureRecognizer:tap];
        
        [_yinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake([UIScreen mainScreen].bounds.size.width-8-105, 18));
            make.top.equalTo(self.mas_top).offset(16);
            make.left.equalTo(self.mas_left).offset(105);
            
        }];

        
    }
    return self;
}
-(void)setRightStr:(NSString *)rightStr{
    if (_rightStr!=rightStr) {
        _rightStr=rightStr;
    }
    _yinLabel.text = _rightStr;
    [_yinLabel mas_updateConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(CGSizeMake([UIScreen mainScreen].bounds.size.width-8-105, _rightHeight-14));
        make.top.equalTo(self.mas_top).offset(16);
        make.left.equalTo(self.mas_left).offset(105);
        
    }];
}
-(void)yinSutBtnClick:(UITapGestureRecognizer *)tap
{
    [self.delegate yinSutBtnClick:_yinLabel];
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
